[lock.zwave] Bugfix Zwave lock #5619
Conversation
|
@turbokongen, thanks for your PR! By analyzing the history of the files in this pull request, we identified @devdelay and @armills to be potential reviewers. |
|
Hi @turbokongen, It seems you haven't yet signed a CLA. Please do so here. Once you do that we will be able to review and accept this pull request. Thanks! |
|
Trying to sign the CLA I get: {"message":"Missing Authentication Token"} |
|
Hey, sorry the CLA link was wrong, it's now been fixed. Please sign the CLA here. |
| ' is %s', value.data) | ||
| notification_data = value.data | ||
| if self._v2btze: | ||
| for value in (self._node.get_values( |
There was a problem hiding this comment.
I see this kind of code all over Z-Wave, what about we introduce a method like this:
(not including other filters already present on node.get_values)
get_values(node, class_id=None, index=None, data=None):
result = []
kwargs = {}
if class_id is None:
kwargs['class_id'] = class_id
values = node.get_values(**kwargs).values()
for value in values:
if index is not None and value.index != index:
continue
if data is not None and value.data != data:
continue
results.append(value)
return resultsThere was a problem hiding this comment.
I need some time to look over the code and see how this should be done. It's not totally consistent what is being used, some places uses type, genre, othe places label, and some places like your example. Could this be for an other PR?
Related issue (if applicable): fixes #5567